import request from "@/utils/request";

// 首页课程
const getHomeCourse=(data)=>request("/index/index","GET",data)
// 获取省市区
const getAreaData=()=>request("/index/area_data","GET")
// 获取年级
const getGradeShow=()=>request("/index/grade_show","GET")
// 获取学科
const getsubject=(data)=>request("/index/getsubject","GET",data)
// 获取课时
const getclasshour=(data)=>request("/index/getclasshour","GET",data)
// 获取课程
const getCourse=(data)=>request("/lesson/getlist","GET",data)
// 获取课程详情
const getCourseInfo=(data)=>request("/lesson/getdetail","GET",data)
// 收藏、取消收藏课程
const getCollectCourse=(data)=>request("/lesson/collects","POST",data)
// 创建课程订单
const getCreateOrder=(data)=>request("/lesson/create_order","POST",data)
// 支付课程订单
const getPayOrder=(data)=>request("/lesson/gotopay","POST",data)
// 学习订单列表
const getOrderList=(data)=>request("/lesson/getorderlist","GET",data)
// 学习订单详情
const getOrderInfo=(data)=>request("/lesson/getorderdetail","GET",data)
// 评价订单
const getCommOrder=(data)=>request("/lesson/comment","POST",data)
// 添加学习记录
const getAddRecord=(data)=>request("/lesson/addlog","POST",data)
// 学习记录
const getRecord=(data)=>request("/lesson/getloglist","GET",data)
export {
    getHomeCourse,
    getAreaData,
    getclasshour,
    getsubject,
    getGradeShow,
    getCourse,
    getCourseInfo,
    getCollectCourse,
    getCreateOrder,
    getPayOrder,
    getOrderList,
    getOrderInfo,
    getCommOrder,
    getAddRecord,
    getRecord
}